package com.lys.emsystem.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lys.emsystem.mapper.MenuMapper;
import com.lys.emsystem.entity.Menu;
import com.lys.emsystem.service.MenuService;
import com.lys.emsystem.vo.MenuVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MenuServiceImpl implements MenuService {

    @Autowired
    private MenuMapper menuMapper;

    @Override
    public IPage<Menu> search(Page page, MenuVo menuVo) {
        return menuMapper.search(page, menuVo);
    }

    @Override
    public int delList(int[] ids) {
        return menuMapper.delList(ids);
    }

    @Override
    public int add(Menu menu) {
        return menuMapper.insert(menu);
    }

    @Override
    public int update(Menu menu) {
        return menuMapper.updateById(menu);
    }

    @Override
    public int delete(int id) {
        return menuMapper.deleteById(id);
    }

}
